package com.hmall.handler;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 远程调用拦截器
 *
 * @author zhang
 * @date 2022/06/13
 */
@Slf4j
@Component
public class MyFeignInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate template) {
        log.info("=======请求拦截啦======");
        template.header("authorization", "2");
    }
}